$('#btn').click(function (e) {
    e.preventDefault();
    let cookie = $.cookie('cd');
    if (cookie == undefined) {
        window.location.href = 'login.html'
    } else {
        window.location.href='html/user.html?cd='+cookie
    }
});